import Vue from 'vue'
import App from './App'
import store from './store'

import {
  myRequest
} from './util/api.js'

Vue.prototype.$Request = myRequest

Vue.config.productionTip = false

App.mpType = 'app'

// 全局注入
Vue.mixin({
  computed: {
    appId: () => store.state.appId,
    enterpriseId: () => store.state.enterpriseId,
    phoneNumber: () => store.state.user.phoneNumber,
    openId: () => store.state.user.openId,
    unionId: () => store.state.user.unionId,
    userId: () => store.state.user.userId,
    userInfo: () => store.state.user.userInfo,
    stationId: () => store.state.station.stationId,
    selectedGun: () => store.state.station.selectedGun,
    labelId: () => store.state.station.labelId,
    employeeId: () => store.state.station.employeeId,
    userScan: () => store.state.station.userScan,
    orderInfo: () => store.state.order.orderInfo,
    
  }
})


const app = new Vue({
  store,
  ...App
})
app.$mount()
